package com.springboot.java.design.composite;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author: TongRui乀
 * @Date: 2019-12-12 17:38
 * @description： 叶子构件  无子节点
 */
@Slf4j
public class ImageFile extends AbstractFile {

    String fileName;

    public ImageFile(String name){
        this.fileName = name;
    }

    @Override
    public void addFile(AbstractFile file) {
        log.info("不支持的操作");
    }

    @Override
    public void deleteFile(AbstractFile file) {
        log.info("不支持的操作");
    }

    @Override
    public void kill() {
        log.info("图片文件{}杀毒完成！", this.fileName);
    }
}
